package com.maxmlr.nacosconfig.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @author maxiao
 * @create 2019/5/18
 * @since 1.0.0
 */
@RestController
@RefreshScope
public class TestController {


    @Value("${maxmlr.name:}")
    private String title;


    @Value("${a.a.a:}")
    private String aaa;

    @Value("${b.b.b:}")
    private String bbb;

    @GetMapping("/test")
    public String hello() {

        new ArrayList<>();
        return title + "; aaa=" + aaa + "; bbb=" + bbb;
    }

}
